<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html>

	<head>

		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<title><?=SYSTEM_TITLE?></title>

		<link href="<?=base_url("assets/css/bootstrap.min.css")?>" rel="stylesheet">
		<link href="<?=base_url("assets/font-awesome/css/font-awesome.css")?>" rel="stylesheet">

		<!-- Toastr style -->
		<link href="<?=base_url("assets/css/plugins/toastr/toastr.min.css")?>" rel="stylesheet">

		<link href="<?=base_url("assets/css/animate.css")?>" rel="stylesheet">
		<link href="<?=base_url("assets/css/style.css")?>" rel="stylesheet">

		<link href="<?=base_url("assets/css/plugins/dataTables/datatables.min.css")?>" rel="stylesheet">
		<link href="<?=base_url("assets/css/plugins/jasny/jasny-bootstrap.min.css")?>" rel="stylesheet">
				
	</head>

	<body>

		<?$this->load->view("templates/header")?>

       <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
				<div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>分店账号管理</h5>
                    </div>
                    <div class="ibox-content">
						<div class="row">
							<form action="<?=site_url("main/admin_management")?>" method="get">
                                <div class="col-sm-6 col-xs-offset-2">
                                    <div class="form-group">
                                        <div class="fg-line">
                                            <input type="text" class="form-control" name="keyword" value="<?=$keyword?>" placeholder="请输入要搜索的关键字">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <button class="btn btn-primary" style="margin-left:15px"> 搜索</button>
                                    <a class="btn btn-success" style="margin-left:15px" href="<?=site_url("main/admin/-1")?>"> + 新增分店账号 + </a>
                                </div>
                            </form>
						</div>   
						<div class="row m-t-lg">
							<div class="col-sm-12">
								<table class="table table-striped">
									<thead>
									<tr>
										<th>分店账号</th>
										<th>密码</th>
										<th>真实名称</th>
										<th>操作</th>
									</tr>
									</thead>
									<tbody>
									<?foreach($objects as $o){?>
									<tr>
										<td><?=$o["adm_username"]?></td>
										<td><?=$o["adm_password"]?></td>
										<td><?=$o["adm_realname"]?></td>
										<td>
											<a class="btn btn-xs btn-primary waves-effect waves-float" href="<?=site_url("main/admin/".$o["adm_id"])?>">
											<i class="zmdi zmdi-edit"></i> 详细资料</a>
											
											<!--<a class="btn btn-xs btn-danger waves-effect waves-float" href="<?=site_url("main/delete_admin/".$o["adm_id"])?>">
											<i class="zmdi zmdi-delete"></i> 删除</a>-->
										</td>

									</tr>
									<?}?>
									</tbody>
								</table>
								<?=$this->pagination->create_links();?>
							</div>
						</div>
						
					</div>
				</div>
            </div>
		</div>

		<?$this->load->view("templates/footer")?>

		<!-- Mainly scripts -->
		<script src="<?=base_url("assets/js/jquery-3.1.1.min.js")?>"></script>
		<script src="<?=base_url("assets/js/bootstrap.min.js")?>"></script>
		<script src="<?=base_url("assets/js/plugins/metisMenu/jquery.metisMenu.js")?>"></script>
		<script src="<?=base_url("assets/js/plugins/slimscroll/jquery.slimscroll.min.js")?>"></script>

		<!-- Custom and plugin javascript -->
		<script src="<?=base_url("assets/js/inspinia.js")?>"></script>
		<script src="<?=base_url("assets/js/plugins/pace/pace.min.js")?>"></script>
		
		<script src="<?=base_url("assets/js/plugins/jasny/jasny-bootstrap.min.js")?>"></script>
		
		<!-- Toastr script -->
		<script src="<?=base_url("assets/js/plugins/toastr/toastr.min.js")?>"></script>


		<script>
		$(document).ready(function(){
			 

		});

		</script>
		<?$this->load->view("templates/script")?>
	</body>

</html>
